package com.qfedu.yige.controller;

import com.qfedu.yige.pojo.Activity;
import com.qfedu.yige.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/activit")
public class ActivityController {

    @Autowired
    private ActivityService activityService;

    @RequestMapping("/findAll")
    public List<Activity> findAll(){
        List<Activity> list = activityService.list();
        return list;
    }
}
